home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib / tk / wm.man < prev   
Encoding:
Text File  |  1992-08-24  |  25.4 KB  |  610 lines

  1. '\"
  2. '\" Copyright 1991 Regents of the University of California
  3. '\" Permission to use, copy, modify, and distribute this
  4. '\" documentation for any purpose and without fee is hereby
  5. '\" granted, provided that this notice appears in all copies.
  6. '\" The University of California makes no representations about
  7. '\" the suitability of this material for any purpose.  It is
  8. '\" provided "as is" without express or implied warranty.
  9. '\" 
  10. '\" $Header: /user6/ouster/wish/man/RCS/wm.man,v 1.9 92/07/14 11:36:24 ouster Exp $ SPRITE (Berkeley)
  11. '/" 
  12. .\" The definitions below are for supplemental macros used in Sprite
  13. .\" manual entries.
  14. .\"
  15. .\" .HS name section [date [version]]
  16. .\"    Replacement for .TH in other man pages.  See below for valid
  17. .\"    section names.
  18. .\"
  19. .\" .AP type name in/out [indent]
  20. .\"    Start paragraph describing an argument to a library procedure.
  21. .\"    type is type of argument (int, etc.), in/out is either "in", "out",
  22. .\"    or "in/out" to describe whether procedure reads or modifies arg,
  23. .\"    and indent is equivalent to second arg of .IP (shouldn't ever be
  24. .\"    needed;  use .AS below instead)
  25. .\"
  26. .\" .AS [type [name]]
  27. .\"    Give maximum sizes of arguments for setting tab stops.  Type and
  28. .\"    name are examples of largest possible arguments that will be passed
  29. .\"    to .AP later.  If args are omitted, default tab stops are used.
  30. .\"
  31. .\" .BS
  32. .\"    Start box enclosure.  From here until next .BE, everything will be
  33. .\"    enclosed in one large box.
  34. .\"
  35. .\" .BE
  36. .\"    End of box enclosure.
  37. .\"
  38. .\" .VS
  39. .\"    Begin vertical sidebar, for use in marking newly-changed parts
  40. .\"    of man pages.
  41. .\"
  42. .\" .VE
  43. .\"    End of vertical sidebar.
  44. .\"
  45. .\" .DS
  46. .\"    Begin an indented unfilled display.
  47. .\"
  48. .\" .DE
  49. .\"    End of indented unfilled display.
  50. .\"
  51. '\"    # Heading for Sprite man pages
  52. .de HS
  53. .if '\\$2'cmds'       .TH \\$1 1 \\$3 \\$4
  54. .if '\\$2'lib'        .TH \\$1 3 \\$3 \\$4
  55. .if '\\$2'tcl'        .TH \\$1 3 \\$3 \\$4
  56. .if '\\$2'tk'         .TH \\$1 3 \\$3 \\$4
  57. .if t .wh -1.3i ^B
  58. .nr ^l \\n(.l
  59. .ad b
  60. ..
  61. '\"    # Start an argument description
  62. .de AP
  63. .ie !"\\$4"" .TP \\$4
  64. .el \{\
  65. .   ie !"\\$2"" .TP \\n()Cu
  66. .   el          .TP 15
  67. .\}
  68. .ie !"\\$3"" \{\
  69. .ta \\n()Au \\n()Bu
  70. \&\\$1    \\fI\\$2\\fP    (\\$3)
  71. .\".b
  72. .\}
  73. .el \{\
  74. .br
  75. .ie !"\\$2"" \{\
  76. \&\\$1    \\fI\\$2\\fP
  77. .\}
  78. .el \{\
  79. \&\\fI\\$1\\fP
  80. .\}
  81. .\}
  82. ..
  83. '\"    # define tabbing values for .AP
  84. .de AS
  85. .nr )A 10n
  86. .if !"\\$1"" .nr )A \\w'\\$1'u+3n
  87. .nr )B \\n()Au+15n
  88. .\"
  89. .if !"\\$2"" .nr )B \\w'\\$2'u+\\n()Au+3n
  90. .nr )C \\n()Bu+\\w'(in/out)'u+2n
  91. ..
  92. '\"    # BS - start boxed text
  93. '\"    # ^y = starting y location
  94. '\"    # ^b = 1
  95. .de BS
  96. .br
  97. .mk ^y
  98. .nr ^b 1u
  99. .if n .nf
  100. .if n .ti 0
  101. .if n \l'\\n(.lu\(ul'
  102. .if n .fi
  103. ..
  104. '\"    # BE - end boxed text (draw box now)
  105. .de BE
  106. .nf
  107. .ti 0
  108. .mk ^t
  109. .ie n \l'\\n(^lu\(ul'
  110. .el \{\
  111. .\"    Draw four-sided box normally, but don't draw top of
  112. .\"    box if the box started on an earlier page.
  113. .ie !\\n(^b-1 \{\
  114. \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  115. .\}
  116. .el \}\
  117. \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  118. .\}
  119. .\}
  120. .fi
  121. .br
  122. .nr ^b 0
  123. ..
  124. '\"    # VS - start vertical sidebar
  125. '\"    # ^Y = starting y location
  126. '\"    # ^v = 1 (for troff;  for nroff this doesn't matter)
  127. .de VS
  128. .mk ^Y
  129. .ie n 'mc \s12\(br\s0
  130. .el .nr ^v 1u
  131. ..
  132. '\"    # VE - end of vertical sidebar
  133. .de VE
  134. .ie n 'mc
  135. .el \{\
  136. .ev 2
  137. .nf
  138. .ti 0
  139. .mk ^t
  140. \h'|\\n(^lu+3n'\L'|\\n(^Yu-1v\(bv'\v'\\n(^tu+1v-\\n(^Yu'\h'-|\\n(^lu+3n'
  141. .sp -1
  142. .fi
  143. .ev
  144. .\}
  145. .nr ^v 0
  146. ..
  147. '\"    # Special macro to handle page bottom:  finish off current
  148. '\"    # box/sidebar if in box/sidebar mode, then invoked standard
  149. '\"    # page bottom macro.
  150. .de ^B
  151. .ev 2
  152. 'ti 0
  153. 'nf
  154. .mk ^t
  155. .if \\n(^b \{\
  156. .\"    Draw three-sided box if this is the box's first page,
  157. .\"    draw two sides but no top otherwise.
  158. .ie !\\n(^b-1 \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  159. .el \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\h'|0u'\c
  160. .\}
  161. .if \\n(^v \{\
  162. .nr ^x \\n(^tu+1v-\\n(^Yu
  163. \kx\h'-\\nxu'\h'|\\n(^lu+3n'\ky\L'-\\n(^xu'\v'\\n(^xu'\h'|0u'\c
  164. .\}
  165. .bp
  166. 'fi
  167. .ev
  168. .if \\n(^b \{\
  169. .mk ^y
  170. .nr ^b 2
  171. .\}
  172. .if \\n(^v \{\
  173. .mk ^Y
  174. .\}
  175. ..
  176. '\"    # DS - begin display
  177. .de DS
  178. .RS
  179. .nf
  180. .sp
  181. ..
  182. '\"    # DE - end display
  183. .de DE
  184. .fi
  185. .RE
  186. .sp .5
  187. ..
  188. .HS wm cmds
  189. .BS
  190. '\" Note:  do not modify the .SH NAME line immediately below!
  191. .SH NAME
  192. wm \- Communicate with window manager
  193. .SH SYNOPSIS
  194. \fBwm\fR \fIoption window \fR?\fIargs\fR?
  195. .BE
  196.  
  197. .SH DESCRIPTION
  198. .PP
  199. The \fBwm\fR command is used to interact with window managers in
  200. order to control such things as the title for a window, its geometry,
  201. or the increments in terms of which it may be resized.  The \fBwm\fR
  202. command can take any of a number of different forms, depending on
  203. the \fIoption\fR argument.  All of the forms expect at least one
  204. additional argument, \fIwindow\fR, which must be the path name of a
  205. top-level window.
  206. .PP
  207. The legal forms for the \fBwm\fR command are:
  208. .TP
  209. \fBwm aspect \fIwindow\fR ?\fIminNumer minDenom maxNumer maxDenom\fR?
  210. If \fIminNumer\fR, \fIminDenom\fR, \fImaxNumer\fR, and \fImaxDenom\fR
  211. are all specified, then they will be passed to the window manager
  212. and the window manager should use them to enforce a range of
  213. acceptable aspect ratios for \fIwindow\fR.  The aspect ratio of
  214. \fIwindow\fR (width/length) will be constrained to lie
  215. between \fIminNumer\fR/\fIminDenom\fR and \fImaxNumer\fR/\fImaxDenom\fR.
  216. If \fIminNumer\fR etc. are all specified as empty strings, then
  217. any existing aspect ratio restrictions are removed.
  218. If \fInimNumer\fR etc. are specified, then the command returns an
  219. empty string.  Otherwise, it returns
  220. a Tcl list containing four elements, which are the current values
  221. of \fIminNumer\fR, \fIminDenom\fR, \fImaxNumer\fR, and \fImaxDenom\fR
  222. (if no aspect restrictions are in effect, then an empty string is
  223. returned).
  224. .TP
  225. \fBwm deiconify \fIwindow\fR
  226. Arrange for \fIwindow\fR to be displayed in normal (non-iconified) form.
  227. This is done by mapping the window.  If the window has never been
  228. mapped then this command will not map the window, but it will ensure
  229. that when the window is first mapped it will be displayed
  230. in de-iconified form.  Returns an empty string.
  231. .TP
  232. \fBwm focusmodel \fIwindow\fR ?\fBactive\fR|\fBpassive\fR?
  233. If \fBactive\fR or \fBpassive\fR is supplied as an optional argument
  234. to the command, then it specifies the focus model for \fIwindow\fR.
  235. In this case the command returns an empty string.  If no additional
  236. argument is supplied, then the command returns the current focus
  237. model for \fIwindow\fR.
  238. An \fBactive\fR focus model means that \fIwindow\fR will claim the
  239. input focus for itself or its descendants, even at times when
  240. the focus is currently in some other application.  \fBPassive\fR means that
  241. \fIwindow\fR will never claim the focus for itself:  the window manager
  242. should give the focus to \fIwindow\fR at appropriate times.  However,
  243. once the focus has been given to \fIwindow\fR or one of its descendants,
  244. the application may re-assign the focus among \fIwindow\fR's descendants.
  245. The focus model defaults to \fBpassive\fR, and Tk's \fBfocus\fR command
  246. assumes a passive model of focussing.
  247. .TP
  248. \fBwm geometry \fIwindow\fR ?\fInewGeometry\fR?
  249. If \fInewGeometry\fR is specified, then the geometry of \fIwindow\fR
  250. is changed and an empty string is returned.  Otherwise the current
  251. geometry for \fIwindow\fR is returned (this is the most recent
  252. geometry specified either by manual resizing or
  253. in a \fBwm geometry\fR command).  \fINewGeometry\fR has
  254. the form \fB=\fIwidth\fBx\fIheight\fB\(+-\fIx\fB\(+-\fIy\fR, where
  255. any of \fB=\fR, \fIwidth\fBx\fIheight\fR, or \fB\(+-\fIx\fB\(+-\fIy\fR
  256. may be omitted.  \fIWidth\fR and \fIheight\fR are positive integers
  257. specifying the desired dimensions of \fIwindow\fR.  If \fIwindow\fR
  258. is gridded (see GRIDDED GEOMETRY MANAGEMENT below) then the dimensions
  259. are specified in grid units;  otherwise they are specified in pixel
  260. units.  \fIX\fR and \fIy\fR specify the desired location of
  261. \fIwindow\fR on the screen, in pixels.
  262. If \fIx\fR is preceded by \fB+\fR, it specifies
  263. the number of pixels between the left edge of the screen and the left
  264. edge of \fIwindow\fR's border;  if preceded by \fB\-\fR then
  265. \fIx\fR specifies the number of pixels
  266. between the right edge of the screen and the right edge of \fIwindow\fR's
  267. border.  If \fIy\fR is preceded by \fB+\fR then it specifies the
  268. number of pixels between the top of the screen and the top
  269. of \fIwindow\fR's border;  if \fIy\fR is preceded by \fB\-\fR then
  270. it specifies the number of pixels between the bottom of \fIwindow\fR's
  271. border and the bottom of the screen.
  272. If \fInewGeometry\fR is specified as an empty string then any
  273. existing user-specified geometry for \fIwindow\fR is cancelled, and
  274. the window will revert to the size requested internally by its
  275. widgets.
  276. .TP
  277. \fBwm grid \fIwindow\fR ?\fIbaseWidth baseHeight widthInc heightInc\fR?
  278. This command indicates that \fIwindow\fR is to be managed as a
  279. gridded window.
  280. It also specifies the relationship between grid units and pixel units.
  281. \fIBaseWidth\fR and \fIbaseHeight\fR specify the number of grid
  282. units corresponding to the pixel dimensions requested internally
  283. by \fIwindow\fR using \fBTk_GeometryRequest\fR.  \fIWidthInc\fR
  284. and \fIheightInc\fR specify the number of pixels in each horizontal
  285. and vertical grid unit.
  286. These four values determine a range of acceptable sizes for
  287. \fIwindow\fR, corresponding to grid-based widths and heights
  288. that are non-negative integers.
  289. Tk will pass this information to the window manager;  during
  290. manual resizing, the window manager will restrict the window's size
  291. to one of these acceptable sizes.
  292. Furthermore, during manual resizing the window manager will display
  293. the window's current size in terms of grid units rather than pixels.
  294. If \fIbaseWidth\fR etc. are all specified as empty strings, then
  295. \fIwindow\fR will no longer be managed as a gridded window.  If
  296. \fIbaseWidth\fR etc. are specified then the return value is an
  297. empty string.
  298. Otherwise the return value is a Tcl list containing
  299. four elements corresponding to the current \fIbaseWidth\fR,
  300. \fIbaseHeight\fR, \fIwidthInc\fR, and \fIheightInc\fR;  if
  301. \fIwindow\fR is not currently gridded, then an empty string
  302. is returned.
  303. Note: this command should not be needed very often, since the
  304. \fBTk_SetGrid\fR library procedure and the \fBsetGrid\fR option
  305. provide easier access to the same functionality.
  306. .TP
  307. \fBwm group \fIwindow\fR ?\fIpathName\fR?
  308. If \fIpathName\fR is specified, it gives the path name for the leader of
  309. a group of related windows.  The window manager may use this information,
  310. for example, to unmap all of the windows in a group when the group's
  311. leader is iconified.  \fIPathName\fR may be specified as an empty string to
  312. remove \fIwindow\fR from any group assocation.  If \fIpathName\fR is
  313. specified then the command returns an empty string;  otherwise it
  314. returns the path name of \fIwindow\fR's current group leader, or an empty
  315. string if \fIwindow\fR isn't part of any group.
  316. .TP
  317. \fBwm iconbitmap \fIwindow\fR ?\fIbitmap\fR?
  318. If \fIbitmap\fR is specified, then it names a bitmap in the standard
  319. forms accepted by Tk (see the \fBTk_GetBitmap\fR manual entry for details).
  320. This bitmap is passed to the window manager to be displayed in
  321. \fIwindow\fR's icon, and the command returns an empty string.  If
  322. an empty string is specified for \fIbitmap\fR, then any current icon
  323. bitmap is cancelled for \fIwindow\fR.
  324. If \fIbitmap\fR is specified then the command returns an empty string.
  325. Otherwise it returns the name of
  326. the current icon bitmap associated with \fIwindow\fR, or an empty
  327. string if \fIwindow\fR has no icon bitmap.
  328. .TP
  329. \fBwm iconify \fIwindow\fR
  330. Arrange for \fIwindow\fR to be iconified.  It \fIwindow\fR hasn't
  331. yet been mapped for the first time, this command will arrange for
  332. it to appear in the iconified state when it is eventually mapped.
  333. .TP
  334. \fBwm iconmask \fIwindow\fR ?\fIbitmap\fR?
  335. If \fIbitmap\fR is specified, then it names a bitmap in the standard
  336. forms accepted by Tk (see the \fBTk_GetBitmap\fR manual entry for details).
  337. This bitmap is passed to the window manager to be used as a mask
  338. in conjunction with the \fBiconbitmap\fR option:  where the mask
  339. has zeroes no icon will be displayed;  where it has ones, the bits
  340. from the icon bitmap will be displayed.  If
  341. an empty string is specified for \fIbitmap\fR then any current icon
  342. mask is cancelled for \fIwindow\fR (this is equivalent to specifying
  343. a bitmap of all ones).  If \fIbitmap\fR is specified
  344. then the command returns an empty string.  Otherwise it
  345. returns the name of the current icon mask associated with
  346. \fIwindow\fR, or an empty string if no mask is in effect.
  347. .TP
  348. \fBwm iconname \fIwindow\fR ?\fInewName\fR?
  349. If \fInewName\fR is specified, then it is passed to the window
  350. manager;  the window manager should display \fInewName\fR inside
  351. the icon associated with \fIwindow\fR.  In this case an empty
  352. string is returned as result.  If \fInewName\fR isn't specified
  353. then the command returns the current icon name for \fIwindow\fR,
  354. or an empty string if no icon name has been specified (in this
  355. case the window manager will normally display the window's title,
  356. as specified with the \fBwm title\fR command).
  357. .TP
  358. \fBwm iconposition \fIwindow\fR ?\fIx y\fR?
  359. If \fIx\fR and \fIy\fR are specified, they are passed to the window
  360. manager as a hint about where to position the icon for \fIwindow\fR.
  361. In this case an empty string is returned.  If \fIx\fR and \fIy\fR are
  362. specified as empty strings then any existing icon position hint is cancelled.
  363. If neither \fIx\fR nor \fIy\fR is specified, then the command returns
  364. a Tcl list containing two values, which are the current icon position
  365. hints (if no hints are in effect then an empty string is returned).
  366. .TP
  367. \fBwm iconwindow \fIwindow\fR ?\fIpathName\fR?
  368. If \fIpathName\fR is specified, it is the path name for a window to
  369. use as icon for \fIwindow\fR: when \fIwindow\fR is iconified then
  370. \fIpathName\fR should be mapped to serve as icon, and when \fIwindow\fR
  371. is de-iconified then \fIpathName\fR will be unmapped again.  If
  372. \fIpathName\fR is specified as an empty string then any existing
  373. icon window association for \fIwindow\fR will be cancelled.  If
  374. the \fIpathName\fR argument is specified then an empty string is
  375. returned.  Otherwise the command returns the path name of the
  376. current icon window for \fIwindow\fR, or an empty string if there
  377. is no icon window currently specified for \fIwindow\fR.  Note:
  378. not all window managers support the notion of an icon window.
  379. .TP
  380. \fBwm maxsize \fIwindow\fR ?\fIwidth height\fR?
  381. If \fIwidth\fR and \fIheight\fR are specified, then \fIwindow\fR
  382. becomes resizable and \fIwidth\fR and \fIheight\fR give its
  383. maximum permissible dimensions.
  384. For gridded windows the dimensions are specified in
  385. grid units;  otherwise they are specified in pixel units.
  386. During manual sizing, the window manager
  387. should restrict the window's dimensions to be less than or
  388. equal to \fIwidth\fR and \fIheight\fR.
  389. If \fIwidth\fR and \fIheight\fR are specified as empty strings,
  390. then the maximum size option is cancelled for \fIwindow\fR.
  391. If \fIwidth\fR and \fIheight\fR are
  392. specified, then the command returns an empty string.  Otherwise
  393. it returns a Tcl list with two elements, which are the
  394. maximum width and height currently in effect;  if no maximum
  395. dimensions are in effect for \fIwindow\fR then an empty
  396. string is returned.  See the sections on geometry management
  397. below for more information.
  398. .TP
  399. \fBwm minsize \fIwindow\fR ?\fIwidth height\fR?
  400. If \fIwidth\fR and \fIheight\fR are specified, then \fIwindow\fR
  401. becomes resizable and \fIwidth\fR and \fIheight\fR give its
  402. minimum permissible dimensions.
  403. For gridded windows the dimensions are specified in
  404. grid units;  otherwise they are specified in pixel units.
  405. During manual sizing, the window manager
  406. should restrict the window's dimensions to be greater than or
  407. equal to \fIwidth\fR and \fIheight\fR.
  408. If \fIwidth\fR and \fIheight\fR are specified as empty strings,
  409. then the minimum size option is cancelled for \fIwindow\fR.
  410. If \fIwidth\fR and \fIheight\fR are
  411. specified, then the command returns an empty string.  Otherwise
  412. it returns a Tcl list with two elements, which are the
  413. minimum width and height currently in effect;  if no minimum
  414. dimensions are in effect for \fIwindow\fR then an empty
  415. string is returned.  See the sections on geometry management
  416. below for more information.
  417. .TP
  418. \fBwm positionfrom \fIwindow\fR ?\fIwho\fR?
  419. If \fIwho\fR is specified, it must be either \fBprogram\fR or
  420. \fBuser\fR, or an abbreviation of one of these two.  It indicates
  421. whether \fIwindow\fR's current position was requested by the
  422. program or by the user.  Many window managers ignore program-requested
  423. initial positions and ask the user to manually position the window;  if
  424. \fBuser\fR is specified then the window manager should position the
  425. window at the given place without asking the user for assistance.
  426. If \fIwho\fR is specified as an empty string, then the current position
  427. source is cancelled.
  428. If \fIwho\fR is specified, then the command returns an empty string.
  429. Otherwise it returns \fBuser\fR or \fBwindow\fR to indicate the
  430. source of the window's current position, or an empty string if
  431. no source has been specified yet.  Most window managers interpret
  432. ``no source'' as equivalent to \fBprogram\fR.
  433. .VS
  434. Tk will automatically set the position source to \fBuser\fR
  435. when a \fBwm geometry\fR command is invoked, unless the source has
  436. been set explicitly to \fBprogram\fR.
  437. .VE
  438. .TP
  439. \fBwm sizefrom \fIwindow\fR ?\fIwho\fR?
  440. If \fIwho\fR is specified, it must be either \fBprogram\fR or
  441. \fBuser\fR, or an abbreviation of one of these two.  It indicates
  442. whether \fIwindow\fR's current size was requested by the
  443. program or by the user.  Some window managers ignore program-requested
  444. sizes and ask the user to manually size the window;  if
  445. \fBuser\fR is specified then the window manager should give the
  446. window its specified size without asking the user for assistance.
  447. If \fIwho\fR is specified as an empty string, then the current size
  448. source is cancelled.
  449. If \fIwho\fR is specified, then the command returns an empty string.
  450. Otherwise it returns \fBuser\fR or \fBwindow\fR to indicate the
  451. source of the window's current size, or an empty string if
  452. no source has been specified yet.  Most window managers interpret
  453. ``no source'' as equivalent to \fBprogram\fR.
  454. .TP
  455. \fBwm title \fIwindow\fR ?\fIstring\fR?
  456. If \fIstring\fR is specified, then it will be passed to the window
  457. manager for use as the title for \fIwindow\fR (the window manager
  458. should display this string in \fIwindow\fR's title bar).  In this
  459. case the command returns an empty string.  If \fIstring\fR isn't
  460. specified then the command returns the current title for the
  461. \fIwindow\fR.  The title for a window defaults to its name.
  462. .TP
  463. \fBwm transient \fIwindow\fR ?\fImaster\fR?
  464. If \fIleader\fR is specified, then the window manager is informed
  465. that \fIwindow\fR is a transient window (e.g. pull-down menu) working
  466. on behalf of \fImaster\fR (where \fImaster\fR is the
  467. path name for a top-level window).  Some window managers will use
  468. this information to manage \fIwindow\fR specially.  If \fImaster\fR
  469. is specified as an empty string then \fIwindow\fR is marked as not
  470. being a transient window any more.  If \fImaster\fR is specified,
  471. then the command returns an empty string.  Otherwise the command
  472. returns the path name of \fIwindow\fR's current master, or an
  473. empty string if \fIwindow\fR isn't currently a transient window.
  474. .TP
  475. \fBwm withdraw \fIwindow\fR
  476. Arranges for \fIwindow\fR to be withdrawn from the screen.  This
  477. causes the window to be unmapped and forgotten about by the window
  478. manager.  If the window
  479. .VS
  480. has never been mapped, then this command
  481. causes the window to be mapped in the withdrawn state.  Not all
  482. window managers appear to know how to handle windows that are
  483. mapped in the withdrawn state.
  484. .VE
  485. Note: it sometimes seems to be necessary to withdraw a
  486. window and then re-map it (e.g. with \fBwm deiconify\fR) to get some
  487. window managers to pay attention to changes in window attributes
  488. such as group.
  489.  
  490. .SH "SOURCES OF GEOMETRY INFORMATION"
  491. .PP
  492. Size-related information for top-level windows
  493. can come from three sources.
  494. First, geometry requests come from the widgets that are descendants
  495. of a top-level window.
  496. Each widget requests a particular size for itself
  497. by calling \fBTk_GeometryRequest\fR.  This information is passed to
  498. geometry managers, which then request large enough sizes for parent
  499. windows so that they can layout the children properly.
  500. Geometry information passes upwards through the window hierarchy
  501. until eventually a particular size is requested for each top-level
  502. window.
  503. These requests are called \fIinternal requests\fR in the discussion
  504. below.
  505. The second source of width and height information is through the
  506. \fBwm geometry\fR command.  Third, the user can
  507. request a particular size for a window using the
  508. interactive facilities of the window manager.
  509. The second and third types of geometry requests are called
  510. \fIexternal requests\fR in the discussion below;  Tk treats
  511. these two kinds of requests identically.
  512.  
  513. .SH "UNGRIDDED GEOMETRY MANAGEMENT"
  514. .PP
  515. Tk allows the geometry of a top-level window to be managed in
  516. either of two general ways: ungridded or gridded.
  517. The ungridded form occurs if no \fBwm grid\fR command
  518. has been issued for a top-level window.
  519. Ungridded management has several variants.
  520. In the simplest variant of ungridded windows,
  521. no \fBwm geometry\fR, \fBwm minsize\fR, or \fBwm maxsize\fR
  522. commands have been invoked either.
  523. In this case, the window's size is
  524. determined totally by the internal requests emanating from the
  525. widgets inside the window:  Tk will ask the window manager not to
  526. permit the user to resize the window interactively.
  527. .PP
  528. If a \fBwm geometry\fR command is invoked on an ungridded window,
  529. then the size in that command overrides any size requested by the
  530. window's widgets;  from now on, the window's size will be determined
  531. entirely by the most recent information from \fBwm geometry\fR
  532. commands.  To go back to using the size requested by the window's
  533. widgets, issue a \fBwm geometry\fR command with an empty \fIgeometry\fR
  534. string.
  535. .PP
  536. To enable interactive resizing of an ungridded window, one or both
  537. of the \fBwm maxsize\fR
  538. and \fBwm minsize\fR commands must be issued.
  539. The information from these commands will be passed to the window
  540. manager, and size changes within the specified range will be permitted.
  541. For ungridded windows the limits refer to the top-level window's
  542. dimensions in pixels.
  543. If only a \fBwm maxsize\fR command is issued then the minimum
  544. dimensions default to 1;  if only a \fBwm minsize\fR command is
  545. issued then there will be no limit on the maximum dimensions.
  546. If the size of a window is changed interactively, it has the same
  547. effect as if \fBwm geometry\fR had been invoked:  from now on, internal
  548. geometry requests will be ignored.
  549. To return to internal control over the window's size, issue a
  550. \fBwm geometry\fR command with an empty \fIgeometry\fR argument.
  551. If a window has been manually resized or moved, the \fBwm geometry\fR
  552. command will return the geometry that was requested interactively.
  553.  
  554. .SH "GRIDDED GEOMETRY MANAGEMENT"
  555. .PP
  556. The second style of geometry management is called \fIgridded\fR.
  557. This approach occurs when one of the widgets of an application
  558. supports a range of useful sizes.
  559. This occurs, for example, in a text editor where the scrollbars,
  560. menus, and other adornments are fixed in size but the edit widget
  561. can support any number of lines of text or characters per line.
  562. In this case, it is usually desirable to let the user specify the
  563. number of lines or characters-per-line, either with the
  564. \fBwm geometry\fR command or by interactively resizing the window.
  565. In the case of text, and in other interesting cases also, only
  566. discrete sizes of the window make sense, such as integral numbers
  567. of lines and characters-per-line;  arbitrary pixel sizes are not useful.
  568. .PP
  569. Gridded geometry management provides support for this kind of
  570. application.
  571. Tk (and the window manager) assume that there is a grid of some
  572. sort within the application and that the application should be
  573. resized in terms of \fIgrid units\fR rather than pixels.
  574. Gridded geometry management is typically invoked by turning on
  575. the \fBsetGrid\fR option for a widget;  it can also be invoked
  576. with the \fBwm grid\fR command or by calling \fBTk_SetGrid\fR.
  577. In each of these approaches the particular widget (or sometimes
  578. code in the application as a whole) specifies the relationship between 
  579. integral grid sizes for the window and pixel sizes.
  580. To return to non-gridded geometry management, invoke
  581. \fBwm grid\fR with empty argument strings.
  582. .PP
  583. When gridded geometry management is enabled then all the dimensions specified
  584. in \fBwm minsize\fR, \fBwm maxsize\fR, and \fBwm geometry\fR commands
  585. are treated as grid units rather than pixel units.
  586. Interactive resizing is automatically enabled, and it will be
  587. carried out in even numbers of grid units rather than pixels.
  588. By default there are no limits on the minimum or maximum dimensions
  589. of a gridded window.
  590. As with ungridded windows, interactive resizing has exactly the
  591. same effect as invoking the \fBwm geometry\fR command.
  592. For gridded windows, internally- and externally-requested dimensions
  593. work together: the externally-specified width and height determine
  594. the size of the window in grid units, and the information from the
  595. last \fBwm grid\fR command maps from grid units to pixel units.
  596.  
  597. .SH BUGS
  598. .PP
  599. The window manager interactions seem too complicated, especially
  600. for managing geometry.  Suggestions on how to simplify this would
  601. be greatly appreciated.
  602. .PP
  603. Most existing window managers appear to have bugs that affect the
  604. operation of the \fBwm\fR command.  For example, some changes won't
  605. take effect if the window is already active:  the window will have
  606. to be withdrawn and de-iconified in order to make the change happen.
  607.  
  608. .SH KEYWORDS
  609. aspect ratio, deiconify, focus model, geometry, grid, group, icon, iconify, increments, position, size, title, top-level window, units, window manager
  610.